package com.fangzhi.controller;


import com.fangzhi.mobel.OrderPayment;
import com.fangzhi.mobel.io.SavePaymentIo;
import com.fangzhi.service.OrderPaymentService;
import com.fangzhi.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Autowired
    private OrderPaymentService orderPaymentService;

    /**
     * 新增汇款记录
     * @param io
     * @return
     */
    @PostMapping("/savePayment")
    public ResponseResult savePayment(@RequestBody SavePaymentIo io){
        return orderPaymentService.savePayment(io);
    }
}
